package xiangya.bysj.init;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

import xiangya.bysj.util.PropertyUtil;

@Component
public class InitSystem implements InitializingBean {
	private final static String RESOURCE = "xiangya-config.properties";
	@Override
	public void afterPropertiesSet() throws Exception {
		// 初始化的时候就加载 配置文件 从而减少 项目中 io 读取的次数
		PropertyUtil.setProperties(PropertyUtil.loadFile(RESOURCE));
	}
}
